#! /bin/bash

# Config
alias csh="emacs -nw ~/.bashrc; source ~/.bashrc"
alias cvi="emacs -nw ~/.config/nvim/init.vim"
alias ctm="emacs -nw ~/.tmux.conf && tmux source ~/.tmux.conf"
alias surs="source ~/.zshrc"

# List files
alias l="ls --color=auto"
alias ll="ls -hl --color=auto"
alias la="ls -a --color=auto"
alias lla="ls -alhl --color=auto"

# Apps
alias feh="feh --force-aliasing -Z"
alias bl="bluetoothctl"
alias shred="shred -uzvn 35"
alias mpvn="mpv --no-video"
alias py="python"
alias wget="wget --user-agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/21.0' --no-check-certificate"
alias cal="cal -m"

# Mounting
alias md="udisksctl mount -b"
alias ud="udisksctl unmount -b"
alias d="dragon -a -x"

# bash
alias ls='ls --color=auto'
alias l='ls'
alias c="cd"
alias b="bat"
alias mk="mkdir -p"

# emacs
alias emacs_res="cd ; kill -9 $(pidof emacs) ; emacs --daemon; cd -"
alias emcl="emacsclient -c -nw"
alias em="emacs -q -nw"

# Go
alias grr="go run ."
alias gb="go build"

# Portage
alias ee="emerge --pretend"
alias dsee="doas emerge"
alias dseeam="doas emerge --autounmask=y --autounmask-write"
alias dseu="doas etc-update"
alias dses="doas eselect"
alias desu="yes | doas etc-update --automode -3"
alias dsem="doas emacs -nw"
alias dsuu="doas emerge --sync && doas eix-update"

# Pacman
alias pn="pacman"
alias dspn="doas pacman"
alias snus="doas pacman"

# cli programs
alias ws="watch -tn 0.5 sensors"
alias ds="doas"
alias ddd="doas dd"
alias df="df -h"

alias kernal="cd ~/l/linux && cd -P ./ && pwd && ds mount /dev/nvme0n1p1 /boot && ds make nconfig && ds make -j$(nproc) && ds make modules_install && ds make install && ds grub-mkconfig -o /boot/grub/grub.cfg && ds umount /boot"
alias dsswp="ds swapoff /swapfile && ds swapon /swapfile"
